import { CssAst, ScriptAst } from '../types';

export class Module {
  /** 绝对路径 */
  id: string;
  type?: ModuleType;
  ast?: ScriptAst | CssAst;

  constructor(path: string) {
    this.id = path;
  }

  // getId(mode: Mode) {
  //   if (mode === Mode.Development) {
  //     return this.id;
  //   }
  //   // TODO: path to hash
  //   return this.id;
  // }
}

export enum ModuleType {
  Js,
  Jsx,
  Ts,
  Tsx,
  Css,
}
